package com.search.controller;

import com.search.service.EsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/es")
public class ESController {
    @Autowired
    private EsService esService;
    @GetMapping("/index")
    public void CreatIndex(){
        esService.createIndex();
    }
    @GetMapping("/importAll")
    public void importGoods(){
        esService.importAll();
    }
}
